package de.mpii.util;

public class Uhtml {

	public static String strip(String html) {
		StringBuilder sbuilder = new StringBuilder();

		final String LT = "<", RT = ">";

		int pos = 0, posb, pose;

		posb = html.indexOf(LT, pos);

		if (posb == -1)
			return html;

		while (posb != -1) {
			posb = html.indexOf(LT, pos);
			if (posb == -1) {
				sbuilder.append(html.substring(pos));
				break;
			}

			sbuilder.append(html.substring(pos, posb));

			pose = html.indexOf(RT, posb);
			if (pose == -1)
				break;

			pos = pose + 1;
		}

		return sbuilder.toString();
	}
}
